Commit
ba59e2ce935d ("libxc: allocate memory with vNUMA information for
PV guest") creates default vNUMA layout with a single range containing
all memory. The end of the range is calculated by shifting
dom->total_pages by 12 to the left.
On 32-bit dom0 this may result in losing upper bits since total_pages is
a 32-bit type.
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
dom->nr_vmemranges = 1;
dom->vmemranges = xc_dom_malloc(dom, sizeof(*dom->vmemranges));
dom->vmemranges[0].start = 0;
- dom->vmemranges[0].end = dom->total_pages << PAGE_SHIFT;
+ dom->vmemranges[0].end = (uint64_t)dom->total_pages << PAGE_SHIFT;
dom->vmemranges[0].flags = 0;
dom->vmemranges[0].nid = 0;